#pragma once
#include "BlueprintScriptLibrary/RegistAction.h"
#include "GraphBase.h"
#include "OutputPin.h"

class SequenceGraph : public GraphBase
{
public:
    SequenceGraph() { graphName = "Sequence"; }
    bool OnInit();
    virtual void ParseXmlElement(class TiXmlElement* ele);
    bool SetAttribute(const char* attrName, const char* attrVal);
    void OnDraw();

    virtual void onMouseButtonDown(int button, int x, int y);
    void onMouseMove(int x, int y);
    void onMouseButtonUp(int button, int x, int y);
    BlueprintScriptLibrary::Class* GetClass();
    Vec2vbi GetOutputPinPos(int index);
    VarBaseInt GetInputPinNum() { return 0; }

    void Execute();
    FunctionPin* GetFunctionPin();
    void ConnectTo(GraphBase* graph, int index = 0);
    
    std::vector<GraphBase*> nextGs;
    std::vector<VarBaseInt> nextGid;;
    std::vector<OutputPin*> opp;
};
RegisterBlueprintClass(SequenceGraph)